<template>
  <div class="flex items-center">
    <template v-if="type.value == 'wechatpay'">
      <div class="icon icon-wechatpay text-green"></div>
    </template>
    <template v-if="type.value == 'walletpay'">
      <div class="icon icon-qianbao text-orange"></div>
    </template>
    <div class="ml2">{{ type.name }}</div>
  </div>
</template>
<script lang="ts" name="pay-type" setup>
import { useConfig } from "@/store";
import { ref, StyleValue } from "vue";

const configStore = useConfig();

const props = withDefaults(
  defineProps<{
    type?: {
      value?: string;
      name?: string;
    };
  }>(),
  {
    type: () => {
      return {};
    },
  }
);

const payTypeEnum = ref(configStore.getEnumItem("store.order.PayTypeEnum"));
</script>
<style scoped>
</style>